﻿@model Tasks.UI.Models.SceneryModels.SceneryDataBaseEditModel
@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>编辑景点信息</title>
    <link href="@Config.GetCssResourcePath("main.css")" rel="stylesheet" type="text/css" />
    <link href="@Config.GetCssResourcePath("table.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/global.js")" type="text/javascript"></script>
    <script src="/Scripts/ckeditor/ckeditor_basic.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            initProvince("#ProvinceID");
            initCity("#CityID");
            $("#tabs").tabs();

            $("#form").validate({
                showErrors: function (errorMap, errorList) {
                    $.Msg.errorTips("您的表单填写不完整:", 0, errorList);
                },
                rules: {
                    SceneryName: "required"
                },
                messages: {
                    SceneryName: "请输入景点名称"
                },
                /* 获得焦点时不验证 */
                focusInvalid: false,
                onfocusout: false,
                onkeyup: false
            });

        })
        function addRow(tbl) {
            var tr = $("#" + tbl + " tr").eq(1).clone();
            $(".modelName", tr).val("");
            $(".costPrice", tr).val("0.00");
            $(".sellPrice", tr).val("0.00");
            tr.show();
            tr.appendTo("#" + tbl);
        }
        function delRow(src) {
            $.Msg.confirmDelete(function () {
                var row = $(src).parent().parent();
                row.remove();

            });
        }
        function goto(act) {
            $("#act").val(act);
            $("form").submit();
        }
    </script>
</head>
<body>
    @using (Html.BeginForm())
    {
        <input id="act" name="act" type="hidden" />
        <div id="container">
            <div class="navTitle">
                编辑景点信息
            </div>
            @Html.OutputMessage(Model.Message, Model.MessageType)
            <div class="pageBody">
                <table style="width: 100%;" border="0">
                    <tr>
                        <td style="width: 80px;">
                            <strong>景点名称：</strong>
                        </td>
                        <td style="width: 250px;">
                            @Html.TextBoxFor(t => t.SceneryName, new { style = "width:200px;" })
                        </td>
                        <td style="width: 80px;">
                            <strong>景点位置：</strong>
                        </td>
                        <td>
                            @Html.DropDownList("ProvinceID", PageHelper.ProvinceSelector(Model.ProvinceID))
                            @Html.DropDownList("CityID", PageHelper.CitySelector(Model.CityID, Model.ProvinceID))
                            @Html.DropDownList("AreaID", PageHelper.AreaSelector(Model.AreaID, Model.CityID))
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>景点级别:</strong>
                        </td>
                        <td>
                            @Html.DropDownListFor(t => t.Level, PageHelper.SceneryLevelSelector(Model.Level))
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>联系人：</strong>
                        </td>
                        <td>
                            @Html.TextBoxFor(t => t.Linkman)
                        </td>
                        <td>
                            <strong>联系手机：</strong>
                        </td>
                        <td>
                            @Html.TextBoxFor(t => t.LinkmanMobile)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>电 话：</strong>
                        </td>
                        <td>
                            @Html.TextBoxFor(t => t.LinkmanTel)
                        </td>
                        <td>
                            <strong>传 真:</strong>
                        </td>
                        <td>@Html.TextBoxFor(t => t.Fax)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>景点性质：</strong>
                        </td>
                        <td colspan="3">
                            @Html.DropDownList("Relation", PageHelper.RelationSelector(Model.Relation))
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>成人价：</strong>
                        </td>
                        <td colspan="3">
                            @Html.TextBoxFor(t => t.Price)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>儿童价：</strong>
                        </td>
                        <td colspan="3">
                            @Html.TextBoxFor(t => t.Price1)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>付款方式：</strong>
                        </td>
                        <td colspan="3">
                            @Html.DropDownList("PaymentMode", PageHelper.EnterprisePaymentModeSelector(Model.PaymentMode))
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>备注：</strong>
                        </td>
                        <td colspan="3">
                            @Html.TextAreaFor(t => t.Remark, new { style = "width:99%;height:60px;" })
                        </td>
                    </tr>
                </table>
            </div>
            <div class="BottomBtn" style="padding-left: 80px;">
                <button class="big blue" type="button" onclick="goto('save')">
                    <span>保存</span></button>
                <button class="big blue" type="button" onclick="goto('apply')">
                    <span>应用</span></button>
                <button class="big blue" type="button" onclick="closeTab()">
                    <span>取消</span></button>
            </div>
        </div>
    }
</body>
</html>
